package leetcode.code1298;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution1298 implements IDebug {

	public abstract int maxCandies(int[] status, int[] candies, int[][] keys, int[][] containedBoxes,
			int[] initialBoxes);

	@Override
	public void debug1() {
		int[] status = HelpDebug.str2array3("[1,0,1,0]");
		int[] candies = HelpDebug.str2array3("[7,5,4,100]");
		int[][] keys = new int[][] { {}, {}, { 1 }, {} };// H.str2array1("[[],[],[1],[]]");
		int[][] containedBoxes = new int[][] { { 1, 2 }, { 3 }, {}, {} };// H.str2array1("[[1,2],[3],[],[]]");
		int[] initialBoxes = HelpDebug.str2array3("[0]");
		int r = this.maxCandies(status, candies, keys, containedBoxes, initialBoxes);
		int e = 16;
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		int[] status = HelpDebug.str2array3("[1,0,0,0,0,0]");
		int[] candies = HelpDebug.str2array3("[1,1,1,1,1,1]");
		int[][] keys = str2array("[[1,2,3,4,5],[],[],[],[],[]]");
		int[][] containedBoxes = HelpDebug.str2array1("[[1,2,3,4,5],[],[],[],[],[]]");
		int[] initialBoxes = HelpDebug.str2array3("[0]");
		int r = this.maxCandies(status, candies, keys, containedBoxes, initialBoxes);
		int e = 6;
		HelpDebug.compare(e, r);
	}

	private int[][] str2array(String str){
		str = str.substring(1, str.length()-1);
		String[] arr = str.split(",");

		return null;
	}

	@Override
	public void debug3() {
		int[] status = HelpDebug.str2array3("[1,1,1]");
		int[] candies = HelpDebug.str2array3("[100,1,100]");
		int[][] keys = HelpDebug.str2array1("[[],[0,2],[]]");
		int[][] containedBoxes = HelpDebug.str2array1("[[],[],[]]");
		int[] initialBoxes = HelpDebug.str2array3("[1]");
		int r = this.maxCandies(status, candies, keys, containedBoxes, initialBoxes);
		int e = 1;
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		int[] status = HelpDebug.str2array3("[1]");
		int[] candies = HelpDebug.str2array3("[100]");
		int[][] keys = HelpDebug.str2array1("[[]]");
		int[][] containedBoxes = HelpDebug.str2array1("[[]]");
		int[] initialBoxes = HelpDebug.str2array3("[]");
		int r = this.maxCandies(status, candies, keys, containedBoxes, initialBoxes);
		int e = 0;
		HelpDebug.compare(e, r);
	}

	public void debug5() {
		int[] status = HelpDebug.str2array3("[1,1,1]");
		int[] candies = HelpDebug.str2array3("[2,3,2]");
		int[][] keys = HelpDebug.str2array1("[[],[],[]]");
		int[][] containedBoxes = HelpDebug.str2array1("[[],[],[]]");
		int[] initialBoxes = HelpDebug.str2array3("[2,1,0]");
		int r = this.maxCandies(status, candies, keys, containedBoxes, initialBoxes);
		int e = 7;
		HelpDebug.compare(e, r);
	}

}
